import { OptionsProps } from '@/components/ProForm/interface';

interface leftFormListProps {
  value: OptionsProps['type'];
  label: string;
}

let leftFormList: leftFormListProps[] = [
  {
    label: '输入框',
    value: 'input'
  },
  {
    label: '下拉框',
    value: 'select'
  },
  {
    label: '时间选择器',
    value: 'date-picker'
  },
  {
    label: '树形选择',
    value: 'tree-select'
  }
];

let formList = [];

for (let i = 0; i < leftFormList.length; i++) {
  const item = leftFormList[i];
  formList.push({
    type: item.value,
    hide: false,
    label: item.label,
    prop: 'prop' + i,
    attrs: {
      clearable: true,
      disabled: false
    }
  });
}

export { formList, leftFormList };
